import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';

@Entity({ name: 'User' })
export class User {
    @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
    id: number;

    @Column({ type: 'varchar', length: 100, name: 'name', nullable: false })
    name: string;

    @Column({ type: 'varchar', length: 100, name: 'password', nullable: false })
    password: string;

    @Column({ type: 'timestamptz', name: 'create_time', nullable: true, default: () => 'CURRENT_TIMESTAMP' })
    createTime: Date;
}
